return a % b;

}

function increment() public returns(uint) {

return ++a;

}

function decrement() public returns(uint) {

return --a;

}

function retrieveValues() public view returns(uint, uint) {

return (a, b);

}

}

Please refer to the preceding simple Solidity contract to know how

they can be used in the code.

2.5.11.2 Relational Operators

These operators are used to compare the relationship between two

values. Table 2.2 shows the list supported by Solidity, as follows:

OPERATOR

DENOTATION

DESCRIPTION

Equal

==

Checks if two values are equal or not, returns

true if equal and vice-versa

Not Equal

!=

Checks if two values are equal or not, returns

true if not equal and vice-versa

Greater than

>

Checks if the left value is greater than the right

or not, returns true if greater and vice-versa

Less than

<

Checks if the left value is less than the right or

not, returns true if less and vice-versa

Greater

than

or Equal to

>=

Checks if the left value is greater or equal than

the right or not, returns true if greater or equal

and vice-versa

Less than or

Equal to

<=

Checks if the left value is less or equal than the

right or not, returns true if less or equal and